package com.tencent.cloud.uikit.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.util.TypedValue;

import com.tencent.cloud.iov.util.ResourcesUtils;
import com.tencent.cloud.uikit.R;

/**
 *
 * 常态类按钮
 *
 * 设置按钮样式及按压效果，应用于"关闭"、"取消"等场景
 *
 * @author showxiao
 * @date 2018/8/7
 */
public class NegativeButton extends IovButton {

    public NegativeButton(Context context) {
        super(context);
        init();
    }

    public NegativeButton(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public NegativeButton(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        setBackground(ResourcesUtils.getDrawable(R.drawable.common_btn_line_nor));
        setTextSize(TypedValue.COMPLEX_UNIT_PX,
                ResourcesUtils.getDimensionPixelOffset(R.dimen.text_size_large));
        setTextColor(ResourcesUtils.getColor(R.color.text_color_primary));
    }
}
